import service from '@/utils/request'
// @Tags AfterSaleOrder
// @Summary 创建售后管理
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.AfterSaleOrder true "创建售后管理"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /afterSaleOrders/createAfterSaleOrder [post]
export const createAfterSaleOrder = (data) => {
  return service({
    url: '/afterSaleOrders/createAfterSaleOrder',
    method: 'post',
    data
  })
}

// @Tags AfterSaleOrder
// @Summary 删除售后管理
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.AfterSaleOrder true "删除售后管理"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /afterSaleOrders/deleteAfterSaleOrder [delete]
export const deleteAfterSaleOrder = (params) => {
  return service({
    url: '/afterSaleOrders/deleteAfterSaleOrder',
    method: 'delete',
    params
  })
}

// @Tags AfterSaleOrder
// @Summary 批量删除售后管理
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除售后管理"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /afterSaleOrders/deleteAfterSaleOrder [delete]
export const deleteAfterSaleOrderByIds = (params) => {
  return service({
    url: '/afterSaleOrders/deleteAfterSaleOrderByIds',
    method: 'delete',
    params
  })
}

// @Tags AfterSaleOrder
// @Summary 更新售后管理
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.AfterSaleOrder true "更新售后管理"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /afterSaleOrders/updateAfterSaleOrder [put]
export const updateAfterSaleOrder = (data) => {
  return service({
    url: '/afterSaleOrders/updateAfterSaleOrder',
    method: 'put',
    data
  })
}

// @Tags AfterSaleOrder
// @Summary 用id查询售后管理
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.AfterSaleOrder true "用id查询售后管理"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /afterSaleOrders/findAfterSaleOrder [get]
export const findAfterSaleOrder = (params) => {
  return service({
    url: '/afterSaleOrders/findAfterSaleOrder',
    method: 'get',
    params
  })
}

// @Tags AfterSaleOrder
// @Summary 分页获取售后管理列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取售后管理列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /afterSaleOrders/getAfterSaleOrderList [get]
export const getAfterSaleOrderList = (params) => {
  return service({
    url: '/afterSaleOrders/getAfterSaleOrderList',
    method: 'get',
    params
  })
}

// @Tags AfterSaleOrder
// @Summary 不需要鉴权的售后管理接口
// @Accept application/json
// @Produce application/json
// @Param data query after_sale_orderReq.AfterSaleOrderSearch true "分页获取售后管理列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /afterSaleOrders/getAfterSaleOrderPublic [get]
export const getAfterSaleOrderPublic = () => {
  return service({
    url: '/afterSaleOrders/getAfterSaleOrderPublic',
    method: 'get',
  })
}
